package com.zhiling.www.entity;

import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 用户实体类
 */
@Table(name = "stock_user")
public class User {

    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer userId;//用户id
    private String userName;//用户名，唯一
    private String userPwd;//用户密码
    private Double userMoney;//用户金额
    private String phone;//用户手机号
    private String userCard;//用户身份证
    private String userTname;//用户真实姓名
    private Integer userState;//用户状态（1 已验证 0 未验证）

    public User() {
    }

    public User(Integer userId, String userName, String userPwd, Double userMoney, String phone, String userCard, String userTname, Integer userState) {
        this.userId = userId;
        this.userName = userName;
        this.userPwd = userPwd;
        this.userMoney = userMoney;
        this.phone = phone;
        this.userCard = userCard;
        this.userTname = userTname;
        this.userState = userState;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public Double getUserMoney() {
        return userMoney;
    }

    public void setUserMoney(Double userMoney) {
        this.userMoney = userMoney;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getUserCard() {
        return userCard;
    }

    public void setUserCard(String userCard) {
        this.userCard = userCard;
    }

    public String getUserTname() {
        return userTname;
    }

    public void setUserTname(String userTname) {
        this.userTname = userTname;
    }

    public Integer getUserState() {
        return userState;
    }

    public void setUserState(Integer userState) {
        this.userState = userState;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userPwd='" + userPwd + '\'' +
                ", userMoney=" + userMoney +
                ", phone='" + phone + '\'' +
                ", userCard='" + userCard + '\'' +
                ", userTname='" + userTname + '\'' +
                ", userState=" + userState +
                '}';
    }
}
